package com.ruoyi.business.service.impl;

import java.util.List;

import com.ruoyi.business.domain.BusinessTeacher;
import com.ruoyi.business.mapper.BusinessTeacherMapper;
import com.ruoyi.business.service.IBusinessTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 教师信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-23
 */
@Service
public class BusinessTeacherServiceImpl implements IBusinessTeacherService
{
    @Autowired
    private BusinessTeacherMapper businessTeacherMapper;

    /**
     * 查询教师信息
     * 
     * @param teacherId 教师信息主键
     * @return 教师信息
     */
    @Override
    public BusinessTeacher selectBusinessTeacherByTeacherId(Long teacherId)
    {
        return businessTeacherMapper.selectBusinessTeacherByTeacherId(teacherId);
    }

    /**
     * 查询教师信息列表
     * 
     * @param businessTeacher 教师信息
     * @return 教师信息
     */
    @Override
    public List<BusinessTeacher> selectBusinessTeacherList(BusinessTeacher businessTeacher)
    {
        return businessTeacherMapper.selectBusinessTeacherList(businessTeacher);
    }

    /**
     * 新增教师信息
     * 
     * @param businessTeacher 教师信息
     * @return 结果
     */
    @Override
    public int insertBusinessTeacher(BusinessTeacher businessTeacher)
    {
        return businessTeacherMapper.insertBusinessTeacher(businessTeacher);
    }

    /**
     * 修改教师信息
     * 
     * @param businessTeacher 教师信息
     * @return 结果
     */
    @Override
    public int updateBusinessTeacher(BusinessTeacher businessTeacher)
    {
        return businessTeacherMapper.updateBusinessTeacher(businessTeacher);
    }

    /**
     * 批量删除教师信息
     * 
     * @param teacherIds 需要删除的教师信息主键
     * @return 结果
     */
    @Override
    public int deleteBusinessTeacherByTeacherIds(String teacherIds)
    {
        return businessTeacherMapper.deleteBusinessTeacherByTeacherIds(Convert.toStrArray(teacherIds));
    }

    /**
     * 删除教师信息信息
     * 
     * @param teacherId 教师信息主键
     * @return 结果
     */
    @Override
    public int deleteBusinessTeacherByTeacherId(Long teacherId)
    {
        return businessTeacherMapper.deleteBusinessTeacherByTeacherId(teacherId);
    }

    @Override
    public BusinessTeacher selectBusinessTeacherByUserAndPwd(String userName, String password) {
        return businessTeacherMapper.selectBusinessTeacherByUserAndPwd(userName, password);
    }
}
